package TestData.DataStructureTestData.treeTestData.binaryTreeTestData;

/**
 * @author liujun
 * @date 2020-02-18 18:46
 * @description 1、按层：
 * 1-1、按层遍历二叉树 输出数组（队列）
 * 1-2、按层遍历二叉树 输出数组（队列）(特殊符号)
 * 2、S形：
 * 2-1、S形遍历二叉树 输出数组（栈）
 * 3、按序：
 * 3-1、先序遍历二叉树 输出数组
 * 3-2、中序遍历二叉树 输出数组
 * 3-3、后序遍历二叉树 输出数组
 * 3-1-1、先序遍历二叉树 输出数组(特殊符号)
 * 3-2-1、中序遍历二叉树 输出数组(特殊符号)
 * 3-3-1、后序遍历二叉树 输出数组(特殊符号)
 */

public class BinaryTreeTestDemoArray {

    //NLF=NullLeafSymbol:表示空叶子结点
    public static int NLF = Integer.MIN_VALUE;

    //按层遍历二叉树 输出数组（队列）
    public static int[] getBinaryTreeDemo01_Full_2ArrayByLevelPrint = {
             1,
            2, 3
    };
    public static int[] getBinaryTreeDemo01_2ArrayByLevelPrint = {
                 1,
              2,   3,
            4, 5, 6, 7
    };


    //按层遍历二叉树 输出数组（队列）(特殊符号)
    public static int[] getBinaryTreeDemo01_Full_2ArrayByLevelPrint_Symbol = {
                     1,
                2,        3,
            NLF, NLF, NLF, NLF,
    };
    public static int[] getBinaryTreeDemo01_2ArrayByLevelPrint_Symbol = {
                               1,
                     2,                3,
                4,        5,       6,       7,
            NLF, NLF, NLF, NLF,NLF, NLF, NLF, NLF,
    };


    //S形遍历二叉树 输出数组（栈）
    public static int[] getBinaryTreeDemo01_Full_2ArrayBySPrint = {1, 3, 2};
    public static int[] getBinaryTreeDemo01_2ArrayBySPrint = {1, 3, 2, 4, 5, 6, 7};


    //先序遍历二叉树 输出数组
    public static int[] getBinaryTreeDemo01_Full_2ArrayByPreOrderPrint = {
             1,
            2, 3
    };
    public static int[] getBinaryTreeDemo01_2ArrayByPreOrderPrint = {
                 1,
              2,   3,
            4, 5, 6, 7
    };


    //中序遍历二叉树 输出数组
    public static int[] getBinaryTreeDemo01_Full_2ArrayByInOrderPrint = {2, 1, 3};
    public static int[] getBinaryTreeDemo01_2ArrayByInOrderPrint = {
           4, 5, 2, 6, 7, 3, 1,
    };


    //后序遍历二叉树 输出数组
    public static int[] getBinaryTreeDemo01_Full_2ArrayByPostOrderPrint = {2, 3, 1};
    public static int[] getBinaryTreeDemo01_2ArrayByPostOrderPrint = {
            2, 3, 1
    };


    //先序遍历二叉树 输出数组(特殊符号)
    public static int[] getBinaryTreeDemo01_Full_2ArrayByPreOrderPrint_Symbol = {
            1,
            2, NLF, NLF,
            3, NLF, NLF
    };
    public static int[] getBinaryTreeDemo01_2ArrayByPreOrderPrint_Symbol = {
            1, 2, 4, NLF, NLF, 5, NLF, NLF, 3, NLF, NLF, 6, NLF, NLF, 7, NLF, NLF,
    };


    //中序遍历二叉树 输出数组(特殊符号)
    public static int[] getBinaryTreeDemo01_Full_2ArrayByInOrderPrint_Symbol = {
            2, NLF, NLF,
            1,
            3, NLF, NLF,
    };
    public static int[] getBinaryTreeDemo01_2ArrayByInOrderPrint_Symbol = {
        4, NLF, NLF, 2, 5, NLF, NLF, 1, 6, NLF, NLF, 3, 7, NLF, NLF,
    };


    //后序遍历二叉树 输出数组(特殊符号)
    public static int[] getBinaryTreeDemo01_Full_2ArrayByPostOrderPrint_Symbol = {
            2, NLF, NLF,
            3, NLF, NLF,
            1,
    };
    public static int[] getBinaryTreeDemo01_2ArrayByPostOrderPrint_Symbol = {
        NLF, NLF, 4, NLF, NLF, NLF, NLF, 5, 2, NLF, NLF, 6, NLF, NLF, 7, NLF, NLF, 3, 1,
    };
}
